int pmu_owner = 0;
int pmu_hvm_refcount = 0;
+struct xenoprof_vcpu {
+ int event_size;
+ xenoprof_buf_t *buffer;
+};
+
+struct xenoprof {
+ char *rawbuf;
+ int npages;
+ int nbuf;
+ int bufsize;
+ int domain_type;
+#ifdef CONFIG_COMPAT
+ bool is_compat;
+#endif
+ struct xenoprof_vcpu *vcpu;
+};
+
static struct domain *active_domains[MAX_OPROF_DOMAINS];
static int active_ready[MAX_OPROF_DOMAINS];
static unsigned int adomains;
d->xenoprof->npages = npages;
d->xenoprof->nbuf = nvcpu;
d->xenoprof->bufsize = bufsize;
- d->xenoprof->domain_ready = 0;
d->xenoprof->domain_type = XENOPROF_DOMAIN_IGNORED;
/* Update buffer pointers for active vcpus */
if ( x == NULL )
return -EPERM;
- x->domain_ready = 1;
x->domain_type = XENOPROF_DOMAIN_ACTIVE;
active_ready[ind] = 1;
activated++;
if ( x == NULL )
return -EPERM;
- x->domain_ready = 0;
x->domain_type = XENOPROF_DOMAIN_IGNORED;
active_ready[ind] = 0;
active_domains[ind] = NULL;
return ret;
}
else
- {
- d->xenoprof->domain_ready = 0;
d->xenoprof->domain_type = XENOPROF_DOMAIN_IGNORED;
- }
-
- d->xenoprof->is_primary = (xenoprof_primary_profiler == d);
ret = share_xenoprof_page_with_guest(
d, virt_to_mfn(d->xenoprof->rawbuf), d->xenoprof->npages);
} xenoprof_buf_t;
#endif
-struct xenoprof_vcpu {
- int event_size;
- xenoprof_buf_t *buffer;
-};
-
-struct xenoprof {
- char *rawbuf;
- int npages;
- int nbuf;
- int bufsize;
- int domain_type;
- int domain_ready;
- int is_primary;
-#ifdef CONFIG_COMPAT
- int is_compat;
-#endif
- struct xenoprof_vcpu *vcpu;
-};
-
#ifndef CONFIG_COMPAT
#define XENOPROF_COMPAT(x) 0
#define xenoprof_buf(d, b, field) ACCESS_ONCE((b)->field)